﻿using System;
using System.Collections.Generic;
using System.Text;

namespace 模拟电脑_移动硬盘_u盘_mp3
{
    public abstract class MobileStorage
    {
        public abstract void Read();
        public abstract void Write();
    }
    public class MobileDisk : MobileStorage
    {
        public override void Read()
        {
            Console.WriteLine("移动硬盘在读取数据");
        }
        public override void Write()
        {
            Console.WriteLine("移动硬盘在写入数据");
        }
    }
    public class Udisk : MobileStorage
    {
        public override void Read()
        {
            Console.WriteLine("优盘在读取数据");
        }
        public override void Write()
        {
            Console.WriteLine("优盘在写入数据");
        }
    }
    public class MP3 : MobileStorage
    {
        public override void Read()
        {
            Console.WriteLine("MP3在读取数据");
        }
        public override void Write()
        {
            Console.WriteLine("MP3在写入数据");
        }
        public void PlayMusic()
        {
            Console.WriteLine("MP3自己可以播放音乐");
        }
    }
    public class Computer
    {
        public void CpuRead(MobileStorage ms)
        {
            ms.Read();
        }
        public void CpuWrite(MobileStorage ms)
        {
            ms.Write();
        }
    }

    public abstract class Person
    {
        public abstract void Standup();
    }

    public class Student : Person
    {
        public override void Standup()
        {
            Console.WriteLine("学生起立说老师好");
        }
    }
    public class Teacher : Person
    {
        public override void Standup()
        {
            Console.WriteLine("老师起立说校长好");
        }
    }
    public class HeadMaster : Person
    {
        public override void Standup()
        {
            Console.WriteLine("校长起立说领导好");
        }
    }

}
